<template>
  <uv-popup
    mode="center"
    ref="popupRef"
    :close-on-click-overlay="false"
    round="24rpx"
  >
    <view class="popup-content">
      <view class="title">温馨提示</view>
      <slot name="content"></slot>
      <view class="ok-btn text-primary" @tap="close">我知道了</view>
    </view>
  </uv-popup>
</template>
<script setup>
import { onMounted, ref } from 'vue';

const emits = defineEmits(['close']);
const popupRef = ref();
const open = () => {
  popupRef.value.open();
};
const close = () => {
  popupRef.value.close();
  emits('close');
};
onMounted(() => {
  open();
});
</script>
<style lang="scss" scoped>
.popup-content {
  width: 690rpx;
  border-radius: 30rpx;
}
.title,
.ok-btn {
  width: 100%;
  height: 100rpx;
  line-height: 100rpx;
  border-bottom: 1rpx solid #f7f7f7;
  text-align: center;
  font-size: 30rpx;
  font-weight: bold;
}
.ok-btn {
  border-bottom: none;
  border-top: 1rpx solid #f7f7f7;
}
</style>
